<% if mobile? %>

<div class="mobile-orders-new">
  <% content_for :mobile_menu do %>
  <a href=""></a>
  <% end %>

  <% content_for :app_back do %>
  <a href="javascript:void(0)" onclick="history.go(-1)">
    <i class="icon-arrow-left"></i>
  </a>
  <% end %>

  <% content_for :app_title do %>
    订单结算
  <% end %>

  <% content_for :app_action do %>
  <a href=""></a>
  <% end %>

  <hr class="line">

  <div class="address_link">
    <% if @carts.present? %>
      <%= render partial: 'mobile_cart_address', locals: {addresses: @addresses} %>
    <% else %>
      <%= render partial: 'mobile_reserve_address', locals: {reserve: @reserve} %>
    <% end %>
  </div>

  <hr class="line">

  <% if @carts.present? %>
    <%= render partial: 'mobile_cart', locals: {carts: @carts} %>
  <% else %>
    <%= render partial: 'mobile_reserve', locals: {reserve: @reserve} %>
  <% end %>
</div>

<% else %>

<div class="orders-new hidden-xs">
    <div class="row margin-reset title-row">
        <div class="pull-right">
            <a href="">
                <i class="fa fa-angle-left"></i>
                返回购物车
            </a>
        </div>
        <h3>订单结算</h3>
    </div>

    <div class="row margin-reset address-row">
        <h5>收货信息</h5>
      <% if @carts.present? %>
        <%= render partial: 'cart_address', locals: {addresses: @addresses} %>
      <% else %>
        <%= render partial: 'reserve_address', locals: {reserve: @reserve} %>
      <% end %>
    </div>

    <div class="row margin-reset payway-row">
        <h5>支付方式</h5>
        <div class="panel">
            <div class="panel-body">
                <ul>
                    <li>
                      <div class="radio">
                        <label>
                          <input type="radio" name="optionsRadios" id="payway" value="alipay" checked>
                          <img src="<%= image_path('1.png') %>" alt="">
                        </label>
                      </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <% if @carts.present? %>
      <div class="row margin-reset invoice-row top">
          <h5>发票信息</h5>
      </div>

      <invoice></invoice>
    <% end %>

    <div class="row margin-reset  products-list-row">
        <h5>结算清单</h5>
        <% if @carts.present? %>
          <%= render partial: 'cart', locals: {carts: @carts} %>
        <% else %>
          <%= render partial: 'reserve', locals: {reserve: @reserve} %>
        <% end %>
    </div>
</div>

<% end %>
